<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 29/08/2017
 * Time: 21:10
 */
?>
<div class="login-container">
    <div class="login-box animated fadeInDown" style="padding-top: 30px;">
        <div class="text-center" style="padding: 20px 0 40px;font-size: 30px;color:#777;text-shadow: 3px 3px 3px #ffffff;">
            天玺智能交易系统
        </div>
        <div class="login-body">
            <div class="login-title text-center" style="text-shadow: 3px 3px 3px #777;">找回密码</div>
            <form class="form-horizontal" id="form4">
                <div class="form-group">
                    <div class="col-xs-7">
                        <input class="form-control"
                               name="cellphone"
                               type="text"
                               maxlength="11"
                               placeholder="绑定的手机号码"
                               data-error="请输入需要账户绑定的手机号码">
                    </div>
                    <div class="col-xs-5">
                        <button class="btn btn-primary form-control"
                                name="sendSmsBtn"
                                type="button"
                                onclick="sendSms(4)">
                            发送短信
                        </button>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-7">
                        <input class="form-control"
                               type="text" name="captcha"
                               data-error="请输入图片验证码"
                               placeholder="图片验证码">
                    </div>
                    <div class="col-xs-5">
                        <?php
                        echo \yii\captcha\Captcha::widget([
                            'name' => 'captchaImg4',
                            'captchaAction' => 'password/captcha',
                            'template' => '{image}',
                            'options' => [
                                'maxlength' => 4
                            ],

                            'imageOptions' => [
                                'id' => 'captchaImg4',
                                'alt' => '验证码',
                                'title' => '点击刷新',
                                'class' => 'img-response captchaImg',
                                'onclick' => 'refreshCaptcha(4)',
                            ]
                        ]);
                        ?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12">
                        <input class="form-control"
                               type="text"
                               name="smsCode"
                               maxlength="6"
                               data-error="请输入短信验证码"
                               placeholder="手机短信验证码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12">
                        <input class="form-control"
                               type="password"
                               name="password"
                               maxlength="12"
                               placeholder="新设密码"
                               data-error="密码长度为6-12位，且至少包含大写字母、小写字母、数字和特殊字符中的任意两种类型">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12">
                        <input class="form-control"
                               type="password"
                               name="password_confirm"
                               maxlength="12"
                               placeholder="密码确认"
                               data-error="两次密码不一致">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12">
                        <button name="form-submit"
                                type="button"
                                class="btn btn-info btn-block btn-lg"
                                onclick="retrievePassword()">
                            找 回
                        </button>
                    </div>
                </div>

                <div class="login-subtitle text-right">
                    已有账户？<a href="/login">点击登录</a>
                </div>

                <?php
                echo \yii\helpers\Html::hiddenInput(
                    Yii::$app->request->csrfParam,
                    Yii::$app->request->getCsrfToken()
                );
                ?>
            </form>
        </div>
        <div class="login-footer" style="padding: 30px;">
            <div class="text-center">
                &copy; 2018-<?= date('Y') ?> All Rights Reserved.
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/js/password.js?v=<?= Yii::$app->params['version'] ?>"></script>